
const BuryPointWarehouseController = require('../controllers/buryPointWarehouse')
const BuryPointFieldController = require('../controllers/buryPointField')
const BuryPointTestController = require('../controllers/buryPointTest')
const SdkReleaseController = require('../controllers/sdkRelease')
const BuryPointProjectController = require('../controllers/buryPointProject')
const BuryPointCardController = require('../controllers/buryPointCard')
const BuryPointTemplateController = require('../controllers/buryPointTemplate')
const EventController = require('../controllers/event')
const TeamController = require('../controllers/team')
const CenterController = require('../controllers/center')
const Common = require('../controllers/common')

const createRoutes = (router) => {

    router.get('/getSysInfo', Common.getSysInfo);
    router.post('/getMessageByType', Common.getMessageByType);

    /**
     * 点位字段接口
     */
    router.post('/buryPointField/create', BuryPointFieldController.create);
    router.get('/buryPointField/detail', BuryPointFieldController.detail);
    router.post('/buryPointField/update', BuryPointFieldController.update);
    router.post('/buryPointField/delete', BuryPointFieldController.delete);
    router.post('/buryPointField/exportField', BuryPointFieldController.exportField);
    router.post('/buryPointField/page', BuryPointFieldController.getPageList);
    router.post('/buryPointField/list', BuryPointFieldController.getList);
    router.post('/buryPointField/getListByPointId', BuryPointFieldController.getListByPointId);
    router.get('/buryPointField/AllList', BuryPointFieldController.getAllList);

    /**
     * 点位仓库接口
     */
    router.post('/buryPointWarehouse/create', BuryPointWarehouseController.create);
    router.post('/buryPointWarehouse/update', BuryPointWarehouseController.update);
    router.post('/buryPointWarehouse/delete', BuryPointWarehouseController.delete);
    router.get('/buryPointWarehouse/detail', BuryPointWarehouseController.detail);
    router.post('/buryPointWarehouse/page', BuryPointWarehouseController.getPageList);
    router.post('/buryPointWarehouse/list', BuryPointWarehouseController.getList);
    router.get('/buryPointWarehouse/AllList', BuryPointWarehouseController.getAllList);
    router.post('/buryPointWarehouse/exportPoint', BuryPointWarehouseController.exportPoint);
    router.post('/buryPointWarehouse/getProjectAndWeList', BuryPointWarehouseController.getAllPointList);

    /**
     * SDK发布接口
     */
    router.post('/sdkRelease/create', SdkReleaseController.create);
    router.post('/sdkRelease/update', SdkReleaseController.update);
    router.post('/sdkRelease/delete', SdkReleaseController.delete);
    router.get('/sdkRelease/detail', SdkReleaseController.detail);
    router.post('/sdkRelease/page', SdkReleaseController.getPageList);
    router.post('/sdkRelease/list', SdkReleaseController.getList);
    router.get('/sdkRelease/AllList', SdkReleaseController.getAllList);
    router.get('/sdkRelease/downLoad', SdkReleaseController.downloadScript);

     /**
     * 点位项目接口
     */
    router.post('/buryPointProject/create', BuryPointProjectController.create);
    router.post('/buryPointProject/update', BuryPointProjectController.update);
    router.post('/buryPointProject/delete', BuryPointProjectController.delete);
    router.post('/buryPointProject/tree', BuryPointProjectController.tree);
    router.get('/buryPointProject/all', BuryPointProjectController.getAllList);
    router.get('/buryPointProject/allProject', BuryPointProjectController.getAllProjectList);
    router.post('/buryPointProject/getProjectList', BuryPointProjectController.getProjectList);
    router.post('/buryPointProject/getProjectTree', BuryPointProjectController.getProjectTree);
    router.post('/buryPointProject/existTemplate', BuryPointProjectController.existTemplate);


    /**
     * 点位卡片接口
     */
    router.post('/buryPointCard/create', BuryPointCardController.create);
    router.post('/buryPointCard/delete', BuryPointCardController.delete);
    router.post('/buryPointCard/list', BuryPointCardController.getList);
    router.post('/buryPointCard/getList', BuryPointCardController.getListByPageIdAndName);
    router.post('/buryPointCard/sort', BuryPointCardController.sort);
    router.post('/buryPointCard/refresh', BuryPointCardController.refresh);
    router.get('/buryPointCard/export', BuryPointCardController.export);
    router.get('/buryPointCard/tableDisplay', BuryPointCardController.tableDisplay);
    router.get('/buryPointCard/getHeatMapPerData', BuryPointCardController.getHeatMapPerData);

    /**
     * 点位测试接口
     */
    router.post('/buryPointTest/page', BuryPointTestController.getPageList);
    
    /**
     * 模板接口
     */
    router.post('/buryPointTemplate/create', BuryPointTemplateController.create);
    router.post('/buryPointTemplate/update', BuryPointTemplateController.update);
    router.post('/buryPointTemplate/delete', BuryPointTemplateController.delete);
    router.post('/buryPointTemplate/deleteBatch', BuryPointTemplateController.deleteBatch);
    router.post('/buryPointTemplate/copy', BuryPointTemplateController.copy);
    router.post('/buryPointTemplate/createProject', BuryPointTemplateController.createProject);
    router.post('/buryPointTemplate/getMyList', BuryPointTemplateController.getMyTemplatePageList);
    router.post('/buryPointTemplate/getCommonList', BuryPointTemplateController.getCommonTemplatePageList);
    router.post('/buryPointTemplate/getSysList', BuryPointTemplateController.getSysTemplatePageList);
    router.post('/buryPointTemplate/detail', BuryPointTemplateController.detail);
    
    router.get('/sysInfo', EventController.sysInfo);
    router.post('/getConcurrencyByMinuteInHour', EventController.getConcurrencyByMinuteInHour);
    router.get('/getTeams', TeamController.getTeams);

    // 应用中心
    router.post('/wfManage/checkToken', CenterController.checkToken);
    router.post('/wfManage/getUserInfo', CenterController.getUserInfo);
    router.post('/wfManage/getSimpleTeamList', CenterController.getSimpleTeamList);



}

module.exports = {
    createRoutes
}